/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Hua YY
 * Date: 2024-11-23
 * Time: 12:11
 */

class Solution3 {
    public int hammingDistance(int x, int y) {
        int tem = x ^ y;
        int count = 0;
        while(tem != 0){
            tem &= (tem-1);
            count++;
        }
        return count;

    }
}
public class Test3 {
}
